package com.example.lark.common.configuration.properties;

import lombok.Getter;
import lombok.Setter;

// 需要有 setter 方法，原理是通过反射调用 setter 方法为属性赋值
@Setter
@Getter
public class LarkSuiteConfigurationProperties {

    /**
     * 飞书认证信息
     */
    private Auth auth;

    /**
     * 飞书的一些接口URL
     */
    private ApiUrl apiUrl;

    @Setter
    @Getter
    public static class Auth {
        /**
         * 应用唯一的ID标识
         */
        private String appId;

        /**
         * 应用的密钥
         */
        private String appSecret;
    }

    @Setter
    @Getter
    public static class ApiUrl {
        /**
         * 获取 TenantAccessToken 的URL
         */
        private String feiShuTenantAccessTokenUrl;

        /**
         * 获取 JSAPI临时凭证 的URL
         */
        private String feiShuJsapiTicketUrl;

    public void setFeiShuTenantAccessTokenUrl(String feiShuTenantAccessTokenUrl) {
        this.feiShuTenantAccessTokenUrl = feiShuTenantAccessTokenUrl;
    }

    public void setFeiShuJsapiTicketUrl(String feiShuJsapiTicketUrl) {
        this.feiShuJsapiTicketUrl = feiShuJsapiTicketUrl;
    }
}

}
